package com.mazaiting.scheduler.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

/**
 * <p>
 * sys_quartz_log 定时任务日志表
 * </p>
 *
 * @author 党海亮
 * @since 2022-04-05
 */
@TableName("sys_quartz_log")
public class SysQuartzLog {

    /**
     * 主键 ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;


    /**
     * 任务名称
     */
//    @FieldEncrypt
    @TableField("job_name")
    private String jobName;

    /**
     * 定时任务名称
     */
    @TableField("bean_name")
    private String beanName;

    /**
     * 定时任务执行方法名
     */
    @TableField("method_name")
    private String methodName;

    /**
     * 定时任务执行参数
     */
    @TableField("params")
    private String params;

    /**
     * cron 表达式
     */
    @TableField("cron_expression")
    private String cronExpression;

    /**
     * 是否执行成功
     */
    @TableField("is_success")
    private Boolean success;

    /**
     * 异常详情
     */
    @TableField("exception_detail")
    private String exceptionDetail;

    /**
     * 执行耗时
     */
    @TableField("time")
    private Integer time;

    /**
     * 报警邮箱
     */
//    @FieldEncrypt
    @TableField("email")
    private String email;

    /**
     * 子任务 ID
     */
    @TableField("sub_task")
    private String subTask;

    /**
     * 失败后暂停
     */
    @TableField("pause_after_failure")
    private Boolean pauseAfterFailure;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 版本号
     */
    @TableField("version")
    @Version
    private Integer version;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }
    public String getBeanName() {
        return beanName;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }
    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }
    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }
    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }
    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }
    public String getExceptionDetail() {
        return exceptionDetail;
    }

    public void setExceptionDetail(String exceptionDetail) {
        this.exceptionDetail = exceptionDetail;
    }
    public Integer getTime() {
        return time;
    }

    public void setTime(Integer time) {
        this.time = time;
    }
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
    public String getSubTask() {
        return subTask;
    }

    public void setSubTask(String subTask) {
        this.subTask = subTask;
    }
    public Boolean getPauseAfterFailure() {
        return pauseAfterFailure;
    }

    public void setPauseAfterFailure(Boolean pauseAfterFailure) {
        this.pauseAfterFailure = pauseAfterFailure;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
